<template>
  <starModal :ref="ref" :config="config" @click="click">
    <editView :data="dataSet.formData"></editView>
  </starModal>
</template>
<script>
const ref = "editModal";
export default {
  name: ref,
  inject: ["anc"],
  data() {
    return {
      ref,
      config:{
        title: "编辑",
        show:false,
        width: 0,
        height: 400,
        draggable: true,
        mask: true,
        closable: true,
        widthRatio: 0.5,
      }
    };
  },
  props: {
    dataSet: {
      default: () => {
        return {};
      },
    },
   
  },
  watch: {},
  computed: {},
  created() {},
  mounted() {
    this.$nextTick(() => {
      this.$set(this.anc.vms, this.ref, this);
    });
  },
  methods: {
    click(btn){
      if(btn.text == "确定"){
        btn.loading = true;
        this.config.loading = true;
        this.anc.editModalOk(btn);
      }else{
        this.$set(this.config,'show',false);
      }
      this.config.loading = false;
    }, 
  },
};
</script>
<style scoped lang="scss">

</style>
